home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 1 (Walnut Creek)
/
Aminet - June 1993 [Walnut Creek].iso
/
usenet
/
sources
/
volume91
/
utilitys
/
sman_1_1
/
part01
/
sman.doc.uu
/
sman.doc
Wrap
Text File
|
1991-07-29
|
5KB
|
133 lines
SMAN(1) AMIGA Programmer's Manual SMAN(1)
1mNAME
0msman - a document lookup program.
1mSYNOPSIS
sman 0m[-p Search Pattern] [-v Viewer] target [target...]
1mDESCRIPTION
0mThere is no uniform standard for the format or position of
documentation files on the Amiga. This makes a manual
program in the style of the Unix 4mman0m program a somewhat
difficult thing to create. 4msman0m attempts to overcome this
difficulty by allowing the user to specify quite general
rules for the location of documentation files. Once a
document is located, it is passed on to a text viewer to be
displayed.
There are two ways the documentation lookup rules can be
passed to 4msman0m. The first is by the use of the -1mp 0mcommand
line argument, the second is by the ENV: environment
variable 1mSmanPath0m. The command line argument will override
any definition of the environment variable, but at least one
must be defined.
The format of the lookup rule is:
rule1;rule2;...
Each of the rules will be searched in order until a match is
found. A rule is formed by an optional special character,
which specifies the kind of search to be performed on the
matching files, followed by a (possibly) wildcarded AmigaDOS
path specifying the files to be searched. See 4msregexp0m.4mdoc0m
for a discussion of the wildcard format.
There are currently three kinds of search rules implemented:
1mDefault 0m If the rule does not start with one of the
characters discussed below, then no special search is
done on the files on the path, and 4msman0m will succeed on
the first file found. There is a special wildcard
character defined in sman to make this useful. If the
character '&' is found in the search path, it will be
expanded to the current target. For example, if you
typed 'sman test' and 1mSmanPath 0mwas defined as
'DOCS:.../&.(doc|man)', then the path sman would try to
match would be 'DOCS:.../(test).(doc|man)'.
@ If this is the first character of the rule, then sman
will assume the matched files are 4mdme0m.4mrefs0m format files,
as used by Matt Dillon's 4mdme0m editor. The files will be
searched for an entry matching the target.
Jon Spencer -1- Version 1.1
SMAN(1) AMIGA Programmer's Manual SMAN(1)
+ This type of rule tells 4msman0m the matching files are
Amiga Autodoc format files. Each file on the path will
be search for an entry matching the target. For
example, if 1mSmanPath 0mwas '+Autodocs:#?/#?.doc', then
'sman Write' would match to
'Autodocs:LibrariesA-K/dos.doc' (under 1.3 anyway).
All file name searches are case insensitive. All searches
within a file (for '+' and '@' type rules) are case
sensitive.
Once 4msman0m has found a match, that file is passed onto a text
viewer for display. The default viewer is 4msless0m, but this
can be overridden by either the -1mv 0mcommand line argument or
the environment variable 1mSmanViewer0m. If the default viewer
is not overridden, then both '+' and '@' style matches will
tell 4msless0m to start displaying the file at the correct
position. If the default viewer is overridden, then all
files will be displayed at the first line.
1mEXAMPLES
0mExample 1mSmanPath 0mvariable:
+AutoDocs:#?/#?.doc;@dcc:doc/dme.refs;@dcc:man/ me.refs;
DOCS:.../&(.doc|.man|.txt)
1mADDITION CONSIDERATIONS
0m4msman0m will always take the first match that it finds, so the
order of the rules can be used to manipulate the order of
the search.
Also, '@' 4mdme0m.4mrefs0m style searches are the fastest. If you
have the 4mautorefs0m program from Matt Dillon's 4mDICE0m package,
you are better off running this on your Autodocs, rather
than using the '+' style search.
1mSEE ALSO
0msless(1)
1mBUG REPORTS
0mPlease send bug reports, comments etc. to
Jon Spencer
EMail: bhgs@gpu.utcs.utoronto.ca
Jon Spencer -2- Version 1.1